<template>
  <div>
    <div class="recommend-title">周末去哪儿</div>
    <ul>
      <li
        v-for="item of List"
        :key="item.id"
        class="item border-bottom"
      >
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" alt="" />
        </div>
        <div class="item-info">
          <p class="item-title">
            {{ item.title }}
          </p>
          <p class="item-desc">{{ item.desc }}</p>
        </div>
      </li>
    </ul>
    <div class="recommend-floor">查看更多</div>
  </div>
</template>

<script>
export default {
  name: "HomeRecommend",
  props:{
    List:Array
  },
  data() {
    return {
    };
  },
};
</script>

<style lang="stylus" scoped>
@import '~@/assets/style/maxin.stylus'
.recommend-title
  
  line-height: 0.8rem
  background-color: #eee
  text-indent: 0.2rem
  text-align: center
.recommend-floor
  margin-top: 0.2rem
  line-height: 0.8rem
  background-color: #fff
  text-indent: 0.2rem
  text-align: center
  color: green
.item
  // display: flex
  // position: relative
  // overflow: hidden
  // height: 1.9rem
  // background-color: white
  .item-img-wrapper
    height: 0
    padding-bottom: 31%
    overflow: hidden
    .item-img
      width 100%
  .item-info
    // flex: 1
    padding: 0.1rem
    min-width: 0
    .item-title
      color: blue
      line-height: 0.4rem
      font-size: 0.32rem
      ellipsis()
    .item-desc
      line-height: 0.3rem
      color: #ccc
      margin-top: 0.2rem
      margin-bottom: 0.2rem
    
</style>